﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>用车申请</title>
    <link href="../../Content/Global.css" rel="stylesheet" type="text/css" />
    <link href="../../Content/UseCar.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="all">
    


<div id="titleOut">
    <div id="titleInner">
        用车申请
    </div>
</div>



<div id="dealOutTop" class="dealOut">
    <div id="dealInnerTop" class="dealInner">
        <input type="button" value="新建申请" />
        <input type="button" value="删除申请" />
        <input type="button" value="申请单管理" />
        <input type="button" value="返回" />
    </div>
</div>



<div id="ContentOut">
    <table id="ContentInner" class="tableInner" cellpadding="0" cellspacing="0">
        <tr class="head">
            <td>&nbsp;</td>
            <td>用车名称</td>
            <td>司机</td>
            <td>车类型</td>
            <td>建立时间</td>
            <td>操作</td>
        </tr>
        <tr>
            <td><input name="checkbox" type="checkbox" /></td>
            <td><a href="">广佛行</a></td>
            <td>洪司机</td>
            <td>直升机</td>
            <td>2012-7-1</td>
            <td><a href="">编辑</a>&nbsp;&nbsp;<a href="">删除</a></td>
        </tr>
        <tr>
            <td><input name="checkbox" type="checkbox" /></td>
            <td><a href="">广佛行</a></td>
            <td>洪司机</td>
            <td>直升机</td>
            <td>2012-7-1</td>
            <td><a href="">编辑</a>&nbsp;&nbsp;<a href="">删除</a></td>
        </tr>
        <tr>
            <td><input name="checkbox" type="checkbox" /></td>
            <td><a href="">广佛行</a></td>
            <td>洪司机</td>
            <td>直升机</td>
            <td>2012-7-1</td>
            <td><a href="">编辑</a>&nbsp;&nbsp;<a href="">删除</a></td>
        </tr>
    </table>
</div>
<script type="text/javascript">
    var MaterialInner = document.getElementById("ContentInner");
    var trs = MaterialInner.getElementsByTagName("tr");
    var checkboxes = document.getElementsByName("checkbox");

    for (var i = 1; i < trs.length; i++) {
        if (i % 2 != 0) {
            trs[i].className = "a1";
        } else {
            trs[i].className = "a2";
        }
    }


    for (var i = 0; i < checkboxes.length; i++) {
        checkboxes[i].onclick = ChangeChecked;
        /*
        if (checkboxes[i].checked == true) {
        if (i % 2 == 0) {
        trs[i + 1].className = "a3";
        } else {
        trs[i + 1].className = "a4";
        }
        }
        */
    }

    function ChangeChecked() {
        for (var i = 0; i < checkboxes.length; i++) {
            if (this == checkboxes[i]) {
                if (checkboxes[i].checked == "") {
                    if (i % 2 == 0) {
                        trs[i + 1].className = "a1";
                    } else {
                        trs[i + 1].className = "a2";
                    }
                } else {
                    if (i % 2 == 0) {
                        trs[i + 1].className = "a3";
                    } else {
                        trs[i + 1].className = "a4";
                    }
                }
            }
        }
    }

</script>



<div id="dealOutBottom" class="dealOut">
    <div id="dealInnerBottom" class="dealInner">
        <input type="button" value="新建申请" />
        <input type="button" value="删除申请" />
        <input type="button" value="申请单管理" />
        <input type="button" value="返回" />
    </div>
</div>



</div>
</body>
</html>
